package com.gmail.hongyz.myfuse.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class StringUtils {

	public static String slurp(InputStream input) throws IOException {
		StringBuilder sb = new StringBuilder();
		String line;
		BufferedReader reader = new BufferedReader(new InputStreamReader(input, "UTF-8"));
		while ((line = reader.readLine()) != null) {
			sb.append(line).append("\n");
		}
		input.close();
		return sb.toString();
	}
}
